<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <meta name="language" content="en"/>

    <!-- blueprint CSS framework -->
    <link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/css/home/screen.css"
          media="screen, projection"/>
    <link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/css/home/print.css"
          media="print"/>

    <!--[if lt IE 8]>
    <link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/css/home/ie.css"
          media="screen, projection"/>
    <![endif]-->

    <link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/css/home/main.css"/>
    <link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/css/home/form.css"/>

    <!-- jquery ui-->
    <link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/scripts/jquery-ui-1.8.20.custom/css/redmond/jquery-ui-1.8.20.custom.css"/>

    <title><?php echo CHtml::encode($this->pageTitle); ?></title>

    <?php echo CHtml::scriptFile(Yii::app()->request->baseUrl . '/scripts/jquery-ui-1.8.20.custom/js/jquery-ui-1.8.20.custom.min.js'); ?>
</head>

<body>

<div class="container" id="page">

    <div id="header">
        <div id="logo"><?php echo CHtml::encode(Yii::app()->name); ?></div>
    </div>
    <!-- header -->

    <div id="mainMbMenu">

        <?php
        /*
              $this->widget('zii.widgets.CMenu',array(
              'items'=>array(
                  array('label'=>'Home', 'url'=>array('/site/index')),
                  //array('label'=>'About', 'url'=>array('/site/page', 'view'=>'about')),
                  //array('label'=>'Contact', 'url'=>array('/site/contact')),
                  array('label'=>'Text Ads', 'url'=>array('/textAds/admin'), 'visible'=>!Yii::app()->user->isGuest),
                  array('label'=>'Banner Ads', 'url'=>array('/bannerAds/admin'), 'visible'=>!Yii::app()->user->isGuest),
                  array('label'=>'Rights', 'url'=>array('/rights/assignment/view'), 'visible'=>!Yii::app()->user->isGuest),
                  array('label'=>'Manage User', 'url'=>array('/user/admin'), 'visible'=>!Yii::app()->user->isGuest),
                  array('label'=>'Login', 'url'=>array('/site/login'), 'visible'=>Yii::app()->user->isGuest),
                  array('label'=>'Logout ('.Yii::app()->user->name.')', 'url'=>array('/site/logout'), 'visible'=>!Yii::app()->user->isGuest)
              ),
          )); */

        $this->widget('application.extensions.mbmenu.MbMenu', array(
            'items' => array(
                array('label' => 'Home', 'url' => array('/site/index')),
                array(
                    'label' => 'Quản lý tin',
                    'items' => array(
                        array('label' => 'Chuyên mục tin', 'url' => array('/categoryNews/admin'), 'visible' => !Yii::app()->user->isGuest),
                        array('label' => 'Tin tức', 'url' => array('/news/admin'), 'visible' => !Yii::app()->user->isGuest),
                    ),
                ),
                array('label' => 'Quản lý người dùng',
                    'items' => array(
                        array('label' => 'Cập nhật thông tin', 'url' => array('/user/updateProfile'), 'visible' => !Yii::app()->user->isGuest),
                        array('label' => 'Phân quyền', 'url' => array('/rights/assignment/view'), 'visible' => !Yii::app()->user->isGuest),
                        array('label' => 'Quản lý người dùng', 'url' => array('/user/admin'), 'visible' => !Yii::app()->user->isGuest),
                        array('label' => 'Đăng nhập', 'url' => array('/site/login'), 'visible' => Yii::app()->user->isGuest),
                        array('label' => 'Đăng xuất (' . Yii::app()->user->name . ')', 'url' => array('/site/logout'), 'visible' => !Yii::app()->user->isGuest),
                    )
                ),
            )));
        ?>

    </div>
    <!-- mainmenu -->
    <?php if (isset($this->breadcrumbs)): ?>
        <?php $this->widget('zii.widgets.CBreadcrumbs', array(
        'links' => $this->breadcrumbs,
    )); ?><!-- breadcrumbs -->
    <?php endif?>

    <?php echo $content; ?>

    <div id="footer">
        Copyright &copy; <?php echo date('Y'); ?> by Tran Dinh<br/>
        All Rights Reserved.<br/>
    </div>
    <!-- footer -->

</div>
<!-- page -->

</body>
</html>
